home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 September
/
CHIP NET Rehberi Eylül 1998.iso
/
tools
/
is30eval
/
IS30AENG
/
ISHARE.2
/
NT40
/
SERVER
/
SYSTEM
/
OEMNSVIS.INF
< prev
Wrap
INI File
|
1998-05-19
|
41KB
|
1,262 lines
;+---------------------------------------------------------------------------
;+ OEMNSVIS.INF
;+
;+ Service installation INF file prototype for i.Share
;+ Copyright (c) 1997 Artisoft, Inc.
;+---------------------------------------------------------------------------
[Identification]
OptionType = NetService
[Options]
ISSERV
[FileConstants]
UtilityInf = "UTILITY.INF"
subroutineinf = "SUBROUTN.INF"
Exit_Code = 0
NetEventDLL = "%SystemRoot%\System32\netevent.dll"
IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
NetMsgDLL = "%SystemRoot%\System32\NetMsg.dll"
Kernel32DLL = "%SystemRoot%\System32\Kernel32.dll"
Manufacturer = "Artisoft"
ProductProviderName = "iShare"
ProductMajorVersion = "3"
ProductMinorVersion = "0"
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
ProductOpSupportWSSERVER = 132
ProductISSERVName = "iShareServer"
ProductMSFTSoftKey = $(!NTN_SoftwareBase)"\Microsoft\Windows\CurrentVersion"
ProductSoftKey = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductProviderName)
; -------------------------------------------------------------------------
; REGISTRY VALUES
;
; Format of list:
; {RegKey,SubKey,ValueName,DataType,Data,DeleteKeyOnRemove}
;
; RegKey - Open registry key.
; SubKey - Subkey under the open key.
; ValueName - Name of value under subkey.
; DataType - One of the defined types.
; Data - Data under valuename
; DeleteKeyOnRemove - Boolean (1 or 0) flag to remove key on deletion.
; -------------------------------------------------------------------------
; -------------------------------------------------------------------------
; SERVICE AND COMPONENT LIST
; -------------------------------------------------------------------------
ProductWSSERVERName = "WSSERVER"
ProductWSSERVERImagePath = "\Program Files\Artisoft\Ishare\isrun32.exe"
ProductWSSERVERSvcType = "service"
ProductWSSERVERKey = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductWSSERVERName)"\CurrentVersion"
ProductWSSERVERParamKey = $(!NTN_ServiceBase)"\"$(ProductWSSERVERName)"\Parameters"
ProductWSSERVERSvcKey = $(!NTN_ServiceBase)"\"$(ProductWSSERVERName)
ProductWSSERVERNetRuleKey = $(ProductWSSERVERKey)"\NetRules"
ProductWSSERVERGrpDepend = "NetBiosGroup"
ProductWSSERVERType = "service"
ProductWSSERVERBindReview = 1
NetRuleWSSERVERBindable = {"ishareServer netBiosTransport non non 100",+
"ishareServer ipxTransport non non 100"}
NetRuleWSSERVERType = "wsserver ishareServer"
NetRuleWSSERVERClass = {"iShareServer basic"}
NetRuleWSSERVERUse = $(ProductWSSERVERType)" no no"
NetRuleWSSERVERBindForm = """Wsserver"" yes yes container"
; -------------------------------------------------------------------------
; SET THE COMPONENT AND SERVICE PIECES.
;
; Form:
; ComponentXXX
; ServiceXXX
;
; Comments:
; A 'Service' is defined to be any driver run by the system. A
; 'Component' is a service that either (a) needs a binding or (b) needs
; to have the name listed in the network property sheet. In addition,
; the [InstallList] section needs to be filled with all Compoenent and
; Service names.
; -------------------------------------------------------------------------
[InstallList]
ISSERV
; -------------------------------------------------------------------------
[ComponentISSERV]
WSSERVER
[ServiceISSERV]
; -------------------------------------------------------------------------
; -------------------------------------------------------------------------
[GeneralConstants]
from = ""
to = ""
ExitCodeOk = 0
ExitCodeCancel = 1
ExitCodeFatal = 2
KeyNull = ""
MAXIMUM_ALLOWED = 33554432
SERVICE_NO_CHANGE = 4294967295
RegistryErrorIndex = NO_ERROR
KeyProduct = ""
KeyParameters = ""
TRUE = 1
FALSE = 0
NoTitle = 0
ExitState = "Active"
OldVersionExisted = $(FALSE)
DriverPath = $(!STF_NTPATH)\drivers
[SystemVars]
!STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
!STF_PLATFORM = "" ? $(!LIBHANDLE) GetPlatform
!STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir
!STF_NTPATH = $(!STF_WINDOWSPATH)
!STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
!STF_COMPUTERNAME = "" ? $(!LIBHANDLE) GetMyComputerName
!STF_USERNAME = "" ? $(!LIBHANDLE) GetMyUserName
!STF_FLOPPYLIST = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
!STF_UNUSEDDRIVES = {} ? $(!LIBHANDLE) GetUnusedDrives
!STF_LANGUAGE = "" ? $(!LIBHANDLE) GetLanguage
!STF_BUSTYPE = "" ? $(!LIBHANDLE) GetMyBusType
!STF_BUSTYPELIST = "" ? $(!LIBHANDLE) GetMyBusTypeList
!NTN_SoftwareBase = "Software"
!NTN_ServiceBase = "System\CurrentControlSet\Services"
!NTN_ScUseRegistry = "NO"
[date]
Now = {} ? $(!LIBHANDLE) GetSystemDate
[DetectSystemMemory]
SystemMemory = "" ? $(!LIBHANDLE) GetMemorySize
[Identify]
read-syms Identification
set Status = STATUS_SUCCESSFUL
set Identifier = $(OptionType)
set Media = #("Source Media Descriptions", 1, 1)
Return $(Status) $(Identifier) $(Media)
[ReturnOptions]
set Status = STATUS_FAILED
set OptionList = {}
set OptionTextList = {}
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) in $(LanguageList)
goto returnoptions
else
set Status = STATUS_NOLANGUAGE
goto finish_ReturnOptions
endif
returnoptions = +
set OptionList = ^(Options, 1)
set OptionTextList = ^(OptionsText$($0), 1)
set Status = STATUS_SUCCESSFUL
finish_ReturnOptions = +
Return $(Status) $(OptionList) $(OptionTextList)
; ---------------------------------------------------------------------------
; SHELL COMMANDS SECTION FOR AUTOMATED USE OF THIS INF FILE
; ---------------------------------------------------------------------------
[Shell Commands]
LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
LoadLibrary "x" $(!STF_CWDDIR)ncpa.cpl !NCPA_HANDLE
ifstr(i) $(!LIBHANDLE) == ""
Debug-Output "OEMSETNT.INF: unable to load setupdll.dll"
set Exit_Code = STATUS_USERCANCEL
exit
endif
ifstr(i) $(!NCPA_HANDLE) == ""
Debug-Output "OEMSETNT.INF: unable to load ncpa.cpl"
set Exit_Code = STATUS_USERCANCEL
exit
endif
read-syms SystemVars
detect SystemVars
;--DEBUG
; Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" "NTN_InfSection: "$(!NTN_InfSection)
Shell "" InstallOption $(!STF_LANGUAGE) $(!OEMNSVIS_OPTION) $(!STF_SRCDIR) "YES" "YES" "YES"
ifint $($ShellCode) != $( !SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: Failed to shell out to InstallOption"
Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" "Failed shell to InstallOption."
exit
endif
set Exit_Code = $($R0)
ifstr(i) $($R0) == STATUS_SUCCESSFUL
set Exit_Code = 1
endif
Debug-Output "OEMSETNT.INF: install returned "$($R0)
FreeLibrary $(!LIBHANDLE)
FreeLibrary $(!NCPA_HANDLE)
;--DEBUG
; Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" "Done."
exit
; ---------------------------------------------------------------------------
; ---------------------------------------------------------------------------
[InstallOption]
set Option = $($1)
set SrcDir = $($2)
set AddCopy = $($3)
set DoCopy = $($4)
set DoConfig = $($5)
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) NOT-IN $(LanguageList)
Return STATUS_NOLANGUAGE
endif
Debug-Output "OEMSETNT.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
Debug-Output "OEMSETNT.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
set-subst LF = "\n"
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
ifstr(i) $(!NTN_Origination) == "NCPA"
set Continue = $(OK)
endif
detect date
detect DetectSystemMemory
set-title $(FunctionTitle)
set to = Begin
set from = Begin
set CommonStatus = STATUS_SUCCESSFUL
EndWait
Begin = +
; -------------------------------------------------------------------------
; INSTALL CODE BEGINS
; -------------------------------------------------------------------------
; Load the special-purpose DLL placed by InstallShield
LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\l4w32utl.dll !L4W32UTL_HANDLE
ifstr(i) $(!L4W32UTL_HANDLE) == ""
Debug-Output "OEMSETNT.INF: unable to load l4w32utl.dll"
set Exit_Code = STATUS_USERCANCEL
exit
endif
; Set the global install lists that cover both components and services.
ForListDo ^(InstallList,1)
Shell "" AppendList {+
^(Component$($),1),+
}
set !InstallList$($) = $($R0)
EndForListDo
; Set the install tasks based on the chosen option
set DoISSERV = FALSE
; Do the operations based on the !NTN_InstallMode when we came in.
Ifstr(i) $(!NTN_InstallMode) == deinstall
ifstr(i) $(Option) == ISSERV
set DoISSERV = TRUE
endif
set OEM_ABANDON_OPTIONS = {}
ifstr(i) $(DoISSERV) == TRUE
ForListDo $(!InstallListISSERV)
set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS),$(Product$($)Name))
EndForListDo
endif
set StartLabel = removewsserver
else-Ifstr(i) $(!NTN_InstallMode) == Update
set StartLabel = UpgradeSoftware
else-Ifstr(i) $(!NTN_InstallMode) == bind
set StartLabel = bindingadapter
else-Ifstr(i) $(!NTN_InstallMode) == configure
Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error: cannot get an error string."
goto ShellCodeError
endif
set Error = $($R0)
set from = end
set to = end
goto nonfatalinfo
else
ifstr(i) $(Option) == ISSERV
set DoISSERV = TRUE
endif
set StartLabel = installadapter
set OEM_ABANDON_OPTIONS = {}
endif
set from = $(fatal)
set to = $(fatal)
goto $(StartLabel)
installadapter = +
; -------------------------------------------------------------------------
; FIRST SET ALL DEPENDENCIES AND INSTALLABLE OPTIONS
; -------------------------------------------------------------------------
set InstallOptionList = {}
ifstr(i) $(DoISSERV) == TRUE
Shell "" AppendList, {+
$(InstallOptionList),+
$(!InstallListISSERV)+
}
set InstallOptionList = $($R0)
endif
; -------------------------------------------------------------------------
; Make sure component is not already installed. If it is, don't re-install
; -------------------------------------------------------------------------
ForListDo $(InstallOptionList)
OpenRegKey $(!REG_H_LOCAL) "" $(Product$($)SvcKey) $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
ifcontains(i) $($) in $(!InstallListISSERV)
set DoISSERV = FALSE
endif
endif
CloseRegKey $(KeyProduct)
EndForListDo
goto nextstep
nextstep = +
StartWait
Ifstr(i) $(!NTN_InstallMode) == install
Ifint $(OldVersionExisted) == $(FALSE)
goto installproduct
endif
endif
goto writeparameters
installproduct = +
Ifstr(i) $(DoCopy) == "YES"
; ----------------------------------------------------------------------
; SET THE SOURCE DIRECTORIES FOR EACH COMPONENT AND SERVICE
; ----------------------------------------------------------------------
ifstr(i) $(DoISSERV) == TRUE
Shell "" SetDefaultSrcDir $(!REG_H_LOCAL) $(ProductSoftKey) "InstallDirectory"
Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Goto ShellCodeError
Else-Ifstr(i) $($R0) == STATUS_FAILED
Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
Goto fatal
Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
Goto successful
Endif
set SrcDirWSSERVER = $($R1)
endif
Endif
install "Install-Option"
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
goto fatal
endif
set OEM_ABANDON_ON = TRUE
; -------------------------------------------------------------------------
; FIRST INSTALL THE SOFTWARE COMPONENT(S)
; -------------------------------------------------------------------------
Debug-Output "OEMSETNT.INF: Install Workstation in registry."
set TempOptionList = {}
ifstr(i) $(DoISSERV) == TRUE
Shell "" AppendList {$(TempOptionList) ^(ComponentISSERV,1)}
set TempOptionList = $($R0)
endif
ForListDo $(TempOptionList)
set ProductName = $(Product$($)Name)
set ProductDisplayName = $(Product$($)DisplayName)
set ProductImagePath = $(Product$($)ImagePath)
set ProductGroup = $(Product$($)Group)
set ProductDepend = $(Product$($)Depend)
set ProductTitle = $(Product$($)Title)
set ProductDescription = $(Product$($)Description)
set ProductSvcType = $(Product$($)SvcType)
set ProductGrpDepend = $(Product$($)GrpDepend)
set ProductInteract = $(Product$($)Interact)
set ProductType = $(Product$($)Type)
set ProductBindReview = $(Product$($)BindReview)
set ProductHidden = $(Product$($)Hidden)
set NetRuleBindable = $(NetRule$($)Bindable)
set NetRuleType = $(NetRule$($)Type)
set NetRuleClass = $(NetRule$($)Class)
set NetRuleUse = $(NetRule$($)Use)
set NetRuleBindForm = $(NetRule$($)BindForm)
ifcontains(i) $($) in ^(ComponentISSERV,1)
set ProductOption = WSSERVER
endif
Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductName))
Debug-Output "OEMSETNT.INF: Install "$(ProductName)" in registry."
;--DEBUG
; Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "About to do "$($)
Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
$(ProductName), +
$(ProductName), +
$(ProductDisplayName), $(STF_CONTEXTINFNAME), +
$(ProductImagePath), $(ProductSvcType), $(ProductGroup), +
$(ProductDepend), "",+
$(NetEventDLL)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "OEMSETNT.INF: Registry error: add software components"
CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
CloseRegKey $($R4)
CloseRegKey $($R5)
goto fatalregistry
endif
Set SoftProductKey = $($R1)
Set SoftNetRuleKey = $($R2)
Set SoftServiceKey = $($R3)
Set SoftParameterKey = $($R4)
Set SoftLinkageKey = $($R5)
; ------------------------------------------------------------------
; SET THE SERVICE INTERACTIVE FLAG IF NECESSARY
; ------------------------------------------------------------------
set NewValueList = {+
{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(ProductType)},+
{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
{MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
{Title,$(NoTitle),$(!REG_VT_SZ),$(ProductTitle)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(ProductDescription)},+
{ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductName)},+
{hidden,$(NoTitle),$(!REG_VT_DWORD),$(ProductHidden)},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
{Review,$(NoTitle),$(!REG_VT_DWORD),$(ProductBindReview)}+
}
;--DEBUG
; Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "Made it past AddSoftwareComponent."
Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "OEMSETNT.INF: registry error: add value list."
CloseRegKey $(SoftProductKey)
CloseRegKey $(SoftNetRuleKey)
CloseRegKey $(SoftServiceKey)
CloseRegKey $(SoftLinkageKey)
CloseRegKey $(SoftParameterKey)
goto fatalregistry
endif
set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleType)},+
{bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleBindable)},+
{class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleClass)}, +
{use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleUse)}, +
{bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleBindForm)}, +
{InfOption,$(NoTitle),$(!REG_VT_SZ),$(ProductOption)}}
;--DEBUG
; Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "Made it past first ValueList."
Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error."
goto ShellCodeError
endif
set NewValueList = {{"DependOnGroup",$(NoTitle),$(!REG_VT_MULTI_SZ),$(ProductGrpDepend)}}
Shell $(UtilityInf), AddValueList, $(SoftServiceKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error."
goto ShellCodeError
endif
set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),$(ProductDepend)}}
Shell $(UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
CloseRegKey $(SoftProductKey)
CloseRegKey $(SoftNetRuleKey)
CloseRegKey $(SoftServiceKey)
CloseRegKey $(SoftParameterKey)
CloseRegKey $(SoftLinkageKey)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "OEMSETNT.INF: Registry error: add value list."
goto fatalregistry
endif
;--DEBUG
; Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "Made it second ValueList."
EndForListDo
; -------------------------------------------------------------------------
; -------------------------------------------------------------------------
Goto writeparameters
writeparameters = +
goto successful
bindingadapter =+
ForListDo ^(InstallList,1)
ForListDo $(!InstallList$($))
set LinkageKey = $(Product$($)SvcKey)"\LINKAGE"
set ServiceName = $(Product$($)Name)
; -----------------------------------------------------------------
; Only fix the service if the review value is set.
; -----------------------------------------------------------------
set ReviewKey = "SOFTWARE\Artisoft\"$(ServiceName)"\CurrentVersion"
OpenRegKey $(!REG_H_LOCAL) "" $(ReviewKey) $(MAXIMUM_ALLOWED) CS_ReviewKey
ifstr $(CS_ReviewKey) != ""
GetRegValue $(CS_ReviewKey) "Review" ReviewInfo
ifint *($(ReviewInfo),4) != 0
; ---------------------------------------------------------
; Open the linkage key
; ---------------------------------------------------------
OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKey) $(MAXIMUM_ALLOWED) CS_TempKey
ifstr $(CS_TempKey) != ""
GetRegValue $(CS_TempKey) "Bind" BindInfo
; -----------------------------------------------------
; Disable Dial-up adapters.
; -----------------------------------------------------
; ForListDo *($(BindInfo),4)
; LibraryProcedure Result, $(!L4W32UTL_HANDLE) StrStr $($) "Dial-Up"
; ifint $(Result) != 0
; GetRegValue $(CS_TempKey) "Bind" CurrentBindInfo
; set CurrentBindList = *($(CurrentBindInfo),4)
; Shell "", GetListIndex $(CurrentBindList) $($)
; ifint $($R0) != 0
; Shell $(UtilityInf), ToggleBinding $(ServiceName) $($R0) "Disable"
; endif
; endif
; EndForListDo
; ---------------------------------------------------------
; Check bindings again if from setup and not from NCPA.
; ---------------------------------------------------------
set ISSetupKey = "SOFTWARE\Artisoft\IShare"
OpenRegKey $(!REG_H_LOCAL) "" $(ISSetupKey) $(MAXIMUM_ALLOWED) CS_ISSetupKey
ifstr $(CS_ISSetupKey) != ""
GetRegValue $(CS_ISSetupKey) "Setup" SetupInfo
ifint *($(SetupInfo),4) != 0
GetRegValue $(CS_ISSetupKey) "Bind" ISBind
GetRegValue $(CS_TempKey) "Bind" BindInfo
; -----------------------------------------------------
; For each item bound, disable anything we don't like.
; -----------------------------------------------------
ForListDo *($(BindInfo),4)
LibraryProcedure Result, $(!L4W32UTL_HANDLE) StrStr $($) *($(ISBind),4)
ifint $(Result) == 0
GetRegValue $(CS_TempKey) "Bind" CurrentBindInfo
set CurrentBindList = *($(CurrentBindInfo),4)
Shell "", GetListIndex $(CurrentBindList) $($)
ifint $($R0) != 0
Shell $(UtilityInf), ToggleBinding $(ServiceName) $($R0) "Disable"
endif
endif
EndForListDo
endif
endif
endif
; ---------------------------------------------------------
; Close the linkage key
; ---------------------------------------------------------
ifstr(i) $(CS_TempKey) != ""
CloseRegKey $(CS_TempKey)
endif
endif
CloseRegKey $(CS_ReviewKey)
CloseRegKey $(CS_SetupKey)
endif
EndForListDo
EndForListDo
goto end
removewsserver = +
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), "WSSERVER"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
; Shell $(UtilityInf), RemoveService, $($), "YES"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "OEMSETNT.INF: ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
ifstr(i) $(DoISSERV) == TRUE
; ----------------------------------------------------------------------
; DELETE REGISTRY KEYS
; ----------------------------------------------------------------------
; DeleteRegTree $(ProductWSSERVERSvcKey)
; ----------------------------------------------------------------------
; DELETE FILES
; ----------------------------------------------------------------------
set RemoveFilesList = ^(RemFiles-WSSERVER, 1)
ForListDo $(RemoveFilesList)
Set FullRemovePath = $(!STF_WINDOWSSYSPATH)$($)
LibraryProcedure Result, $(!LIBHANDLE), DelFile $(FullRemovePath)
EndForListDo
endif
goto end
UpgradeSoftware = +
set Error = "Upgrade: Sorry, not yet implemented."
goto fatal
successful = +
goto end
warning = +
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr(i) $($R1) == "OK"
goto $(to)
else-ifstr(i) $($R1) == "CANCEL"
goto $(from)
else
goto end
endif
nonfatalinfo = +
Set CommonStatus = STATUS_USERCANCEL
Set Severity = STATUS
goto nonfatalmsg
nonfatal = +
Set Severity = NONFATAL
goto nonfatalmsg
nonfatalmsg = +
ifstr(i) $(Error) == ""
Set Severity = NONFATAL
Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
endif
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr(i) $($R1) == "OK"
goto $(from)
else
goto "end"
endif
fatalregistry = +
Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
goto fatal
fatal = +
ifstr(i) $(Error) == ""
Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
endif
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
goto setfailed
ShellCodeError = +
set DlgType = "MessageBox"
set STF_MB_TITLE = $(ShellCodeErrorTitle)
set STF_MB_TEXT = $(ShellCodeErrorText)
set STF_MB_TYPE = 1
set STF_MB_ICON = 3
set STF_MB_DEF = 1
ui start "Error Message"
goto setfailed
setfailed = +
set CommonStatus = STATUS_FAILED
Ifint $(RegistryErrorIndex) == CANT_REMOVE_WKSTA_NTAS
set CommonStatus = STATUS_USERCANCEL
endif
ifstr(i) $(OEM_ABANDON_ON) == TRUE
set OEM_ABANDON_ON = FALSE
goto removewsserver
endif
goto end
end = +
FreeLibrary $(!L4W32UTL_HANDLE)
goto term
term = +
Return $(CommonStatus)
[Install-Option]
set STF_VITAL = ""
ifstr(i) $(AddCopy) == "YES"
ifstr(i) $(DoISSERV) == TRUE
AddSectionFilesToCopyList Files-WSSERVER $(SrcDirWSSERVER) $(!STF_WINDOWSSYSPATH)
endif
endif
ifstr(i) $(DoCopy) == "YES"
set !STF_NCPA_FLUSH_COPYLIST = TRUE
CopyFilesInCopyList
endif
ifstr(i) $(DoConfig) == "YES"
endif
Exit
[Install-Update]
set STF_VITAL = ""
set STF_OVERWRITE = "VERIFYSOURCEOLDER"
ifstr(i) $(DoISSERV) == TRUE
AddSectionFilesToCopyList Files-WSSERVER $(SrcDirWSSERVER) $(!STF_WINDOWSSYSPATH)
endif
Exit
[Source Media Descriptions]
1 = "i.Share Install Disk-1",TAGFILE = disk1
[Signature]
FileType = MICROSOFT_FILE
[GetSignature]
read-syms Signature
return $(FileType)
[ProductType]
STF_PRODUCT = Winnt
STF_PLATFORM = I386
; -------------------------------------------------------------------------
; -------------------------------------------------------------------------
[Files-WSSERVER]
; 1,WSSERVER.EXE,SIZE=500000
[RemFiles-WSSERVER]
; WSSERVER.EXE
; END OF MAIN SECTION
; ---------------------------------------------------------------------------
; SetDefaultSrcDir
;
; Description:
; Finds a source directory in the given registry key.
;
; Usage:
; Shell "" SetDefaultSrcDir $(OpenKeyHandle) $(KeyName) $(ValueName) $(ExtraPath)
; ---------------------------------------------------------------------------
[SetDefaultSrcDir]
set KeyHandle = $($0)
set KeyName = $($1)
set ValueName = $($2)
set ExtraPath = $($3)
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
set !STF_SRCDIR_OVERRIDE = ""
OpenRegKey $(KeyHandle) "" $(KeyName) $(MAXIMUM_ALLOWED) CS_KeyHandle
ifstr $(CS_KeyHandle) != ""
GetRegValue $(CS_KeyHandle) $(ValueName) ValueList
set ValueType = *($(ValueList),3)
ifstr(i) $(ValueType) == $(!REG_VT_SZ)
set !STF_SRCDIR_OVERRIDE = *($(ValueList),4)
endif
endif
CloseRegKey $(CS_KeyHandle)
ifstr(i) $(!STF_SRCDIR_OVERRIDE) != ""
ifstr(i) $(ExtraPath) != ""
set !STF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE)"\"$(ExtraPath)
endif
endif
SetDefaultSrcDir_RETURN =+
return
; ---------------------------------------------------------------------------
; SHELL SUBROUTINES
; ---------------------------------------------------------------------------
; ---------------------------------------------------------------------------
; AppendList
;
; Description:
; Appends List2 to List1
;
; Usage:
; Shell "" AppendList {$(List1), $(List2), ... , $(ListN)}
; ---------------------------------------------------------------------------
[AppendList]
set ListOfLists = $($0)
set NewList = {}
ForListDo $(ListOfLists)
set CurrentList = $($)
ForListDo $(CurrentList)
set NewList = >($(NewList),$($))
EndForListDo
EndForListDo
AppendList_RETURN =+
return $(NewList)
; ---------------------------------------------------------------------------
; WriteKeyValueSection
;
; Usage:
; Shell "" WriteKeyValueSection $(ProductRegKeys)
; ---------------------------------------------------------------------------
[WriteKeyValueSection]
set RegKeyList = $($0)
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
ForListDo $(RegKeyList)
set KeyHandle = *($($),1)
set KeyName = *($($),2)
set ValueName = *($($),3)
set ValueType = *($($),4)
set ValueData = *($($),5)
Shell "", WriteKeyValue $(KeyHandle) $(KeyName) $(ValueName) $(ValueType) $(ValueData)
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto WriteKeyValueSection_RETURN
endif
EndForListDo
WriteKeyValueSection_RETURN =+
return $(RegistryErrorIndex)
; ---------------------------------------------------------------------------
; WriteKeyValue
;
; Usage:
; Shell "" WriteKeyValue $(KeyHandle) +
; $(KeyName) +
; $(ValueName) +
; $(ValueType) +
; $(ValueData)
; ---------------------------------------------------------------------------
[WriteKeyValue]
set KeyHandle = $($0)
set KeyName = $($1)
set ValueName = $($2)
set ValueType = $($3)
set ValueData = $($4)
set RegistryErrorIndex = NO_ERROR
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
Shell "" CreateOrOpenKey $(KeyHandle) $(KeyName)
set RegistryErrorIndex = $($R0)
set CS_KeyHandle = $($R1)
Ifstr $(RegistryErrorIndex) != NO_ERROR
goto WriteKeyValue_RETURN
endif
SetRegValue $(CS_KeyHandle) {$(ValueName),$(NoTitle),$(ValueType),$(ValueData)}
CloseRegKey $(CS_KeyHandle)
WriteKeyValue_RETURN =+
return $(RegistryErrorIndex)
; ---------------------------------------------------------------------------
; DeleteKeyValueSection
;
; Usage:
; Shell "" DeleteKeyValueSection $(ProductRegKeys)
; ---------------------------------------------------------------------------
[DeleteKeyValueSection]
set RegKeyList = $($0)
set RegistryErrorIndex = NO_ERROR
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
ForListDo $(RegKeyList)
set KeyHandle = *($($),1)
set KeyName = *($($),2)
set ValueName = *($($),3)
set DeleteKeyFlag = *($($),6)
ifint $(DeleteKeyFlag) == 0
Shell "", DeleteKeyValue $(KeyHandle) $(KeyName) $(ValueName)
set RegistryError = $($R0)
Ifstr(i) $(RegistryError) != NO_ERROR
ifstr(i) $(RegistryErrorIndex) == NO_ERROR
set RegistryErrorIndex = $(RegistryError)
endif
endif
else
DeleteRegTree $(KeyHandle) $(KeyName)
Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
ifstr(i) $(RegistryErrorIndex) == NO_ERROR
set RegistryErrorIndex = $(ShellCodeErrorText)
endif
endif
endif
EndForListDo
DeleteKeyValueSection_RETURN =+
return $(RegistryErrorIndex)
; ---------------------------------------------------------------------------
; DeleteKeyValue
;
; Usage:
; Shell "" WriteKeyValue $(KeyHandle) +
; $(KeyName) +
; $(ValueName)
; ---------------------------------------------------------------------------
[DeleteKeyValue]
set KeyHandle = $($0)
set KeyName = $($1)
set ValueName = $($2)
set RegistryErrorIndex = NO_ERROR
set CS_KeyHandle = ""
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
OpenRegKey $(KeyHandle) "" $(KeyName) $(MAXIMUM_ALLOWED) CS_KeyHandle
Ifstr $(CS_KeyHandle) == ""
set RegistryErrorIndex = $(ShellCodeErrorText)
goto DeleteKeyValue_RETURN
endif
DeleteRegValue $(CS_KeyHandle) $(ValueName)
Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set RegistryErrorIndex = $(ShellCodeErrorText)
goto DeleteKeyValue_RETURN
endif
DeleteKeyValue_RETURN =+
CloseRegKey $(CS_KeyHandle)
return $(RegistryErrorIndex)
; ---------------------------------------------------------------------------
; CreateOrOpenKey
;
; Description:
; Creates a new key or opens an existing one.
;
; Usage:
; Shell "" CreateOrOpenKey $(OpenKeyHandle) $(NewKeyName)
; ---------------------------------------------------------------------------
[CreateOrOpenKey]
set KeyHandle = $($0)
set KeyName = $($1)
set RegistryErrorIndex = NO_ERROR
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
CreateRegKey $(KeyHandle) {$(KeyName),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" CS_KeyHandle
ifstr $(CS_KeyHandle) == ""
OpenRegKey $(KeyHandle) "" $(KeyName) $(MAXIMUM_ALLOWED) CS_KeyHandle
endif
Ifstr $(CS_KeyHandle) == ""
set RegistryErrorIndex = $(ShellCodeErrorText)
CloseRegKey $(CS_KeyHandle)
endif
CreateOrOpenKey_RETURN =+
return $(RegistryErrorIndex) $(CS_KeyHandle)
; ---------------------------------------------------------------------------
; SwapKeyValues
;
; Description:
; Takes two registry keys as arguments and effectively swaps the values for
; the given key. Note that the key types MUST be the same, or an error
; will result.
;
; Usage:
; Shell "" SwapKeyValues {OpenKeyOne,Key1,Value1} {OpenKey2,Key2,Value2}
; ---------------------------------------------------------------------------
[SwapKeyValues]
set KeyList1 = $($0)
set KeyList2 = $($1)
set RegistryErrorIndex = NO_ERROR
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
Shell "" CreateOrOpenKey *($(KeyList1),1) *($(KeyList1),2)
set RegistryErrorIndex = $($R0)
set CS_KeyHandle1 = $($R1)
Ifstr $(RegistryErrorIndex) != NO_ERROR
goto SwapKeyValues_RETURN
endif
Shell "" CreateOrOpenKey *($(KeyList2),1) *($(KeyList2),2)
set RegistryErrorIndex = $($R0)
set CS_KeyHandle2 = $($R1)
Ifstr $(RegistryErrorIndex) != NO_ERROR
goto SwapKeyValues_RETURN
endif
GetRegValue $(CS_KeyHandle1) *($(KeyList1),3) ListData1
set GetValueStatus1 = $(RegLastError)
GetRegValue $(CS_KeyHandle2) *($(KeyList2),3) ListData2
set GetValueStatus2 = $(RegLastError)
ifint $(GetValueStatus1) != $(!REG_ERROR_SUCCESS)
ifint $(GetValueStatus2) != $(!REG_ERROR_SUCCESS)
set RegistryErrorIndex = $(ShellCodeErrorText)
goto SwapKeyValues_RETURN
endif
endif
ifint $(GetValueStatus2) != $(!REG_ERROR_SUCCESS)
DeleteRegValue $(CS_KeyHandle1) *($(KeyList1),3)
else
SetRegValue $(CS_KeyHandle1) $(ListData2)
Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set RegistryErrorIndex = $(ShellCodeErrorText)
goto SwapKeyValues_RETURN
endif
endif
ifint $(GetValueStatus1) != $(!REG_ERROR_SUCCESS)
DeleteRegValue $(CS_KeyHandle2) *($(KeyList2),3)
else
SetRegValue $(CS_KeyHandle2) $(ListData1)
Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set RegistryErrorIndex = $(ShellCodeErrorText)
goto SwapKeyValues_RETURN
endif
endif
SwapKeyValues_RETURN =+
CloseRegKey $(CS_KeyHandle1)
CloseRegKey $(CS_KeyHandle2)
return $(RegistryErrorIndex)
; ---------------------------------------------------------------------------
; GetListIndex
;
; Purpose:
; Returns the index (beginning with 1) of the specified string. A return
; of 0 signalls an error.
; ---------------------------------------------------------------------------
[GetListIndex]
set CheckList = $($0)
set FindString = $($1)
set ReturnIndex = 0
read-syms GeneralConstants
read-syms FileConstants$(!STF_LANGUAGE)
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
ForListDo $(CheckList)
ifstr(i) $($) == $(FindString)
ifint $(ReturnIndex) == 0
set ReturnIndex = $(#)
endif
endif
EndForListDo
GetListIndex_RETURN =+
return $(ReturnIndex)
; ---------------------------------------------------------------------------
; LANGUAGE-SPECIFIC CONSTANTS
; ---------------------------------------------------------------------------
[LanguagesSupported]
ENG
[OptionsTextENG]
ISSERV = "i.Share 3.0 Server"
[FileConstantsENG]
ProCaption = "i.Share 3.0 Server Setup"
ProCancel = "Cancel"
ProCancelMsg = "i.Share 3.0 Server is not correctly installed. "+
"Are you sure you want to cancel copying files?"
ProCancelCap = "i.Share Setup Message"
ProText1 = "Copying:"
ProText2 = "To:"
FunctionTitle = "i.Share Server Setup"
ProductWSSERVERDescription = "Artisoft i.Share Server gives you the ability to share a Winsock connection among several network clients"
ProductWSSERVERDisplayName = "i.Share 3.0 Server"
ProductWSSERVERTitle = "i.Share 3.0 Server"
ShellCodeErrorTitle = "Error: "$(FunctionTitle)
ShellCodeErrorText = "Shell Code Error."
[DialogConstantsENG]
Help = "&Help"
Exit = "Cancel"
OK = "OK"
HelpContext = ""
Continue = "Continue"
Cancel = "Cancel"
[FileDependentDlgENG]
; ---------------------------------------------------------------------------
; Copyright (C) 1997 Artisoft, Inc.
; ---------------------------------------------------------------------------